package de.tabuma.ssoweb.start.view;

import de.tabuma.lib.tabumaview;
import java.io.*;
import java.util.logging.*;
import javax.servlet.*;
import javax.servlet.http.*;
import de.tabuma.ssoweb.controller.constants;
import com.google.appengine.api.users.*;
import java.util.Hashtable;

/**
 *
 * @author $Author: alefen $
 * @version $Revision: 1.1 $
 * @since $Date: 2009/12/30 01:25:37 $
 */
public class view extends tabumaview {

    private static Logger log = Logger.getLogger(view.class.getName());

    public view(String servlet, Hashtable parameter) {
        super(servlet, parameter);
    }
    
    public void processRequest(ServletContext context, HttpServletRequest request, HttpServletResponse response, PrintWriter out)  {
        try {

            UserService userService = UserServiceFactory.getUserService();
            User user = userService.getCurrentUser();

            String nameProjects = java.util.ResourceBundle.getBundle(de.tabuma.ssoweb.constants.projectLanguageBundle).getString("navigation.link.projects");
            
            out.println("<div class=\"contentHeader\">"+java.util.ResourceBundle.getBundle(de.tabuma.ssoweb.constants.projectLanguageBundle).getString("startpage.header")+"</div>");
            out.println("<div class=\"contentContent\">"+java.util.ResourceBundle.getBundle(de.tabuma.ssoweb.constants.projectLanguageBundle).getString("startpage.content")+"</div>");

            out.println("<ul>");
            out.println("\t<li><a href=\"login?"+constants.MAINNAV+"="+constants.NAVID_PROJECTS+"\" class=\"contentLink\">"+nameProjects+"</a></li>");
            out.println("</ul>");
            
        } 
        catch(Exception e) {
            log.warning(e.getMessage());
        }
    } 


}
